package com.taptech.doufu.model.novel

import android.app.Activity
import com.taptech.doufu.model.novel.bean.NovelCategoryGson
import com.taptech.doufu.net.retrofit.api.ApiClient
import com.taptech.doufu.net.retrofit.api.RxJavaHelper
import rx.Observer

class NovelCategoryModel(val activity: Activity) {



    fun getNovelCategoryList(url:String, last:Int,data:String,tag:String,observer: Observer<NovelCategoryGson>){
        ApiClient.getInstance().apiService.getNovelCategoryList(url,last,data,tag)
                .map {
                    it.data
                }.compose(RxJavaHelper.observeOnMainThread(activity))
                .subscribe(observer)
        }

}